package com.wsx.ones.cloud.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 配置文件的读取，要求前缀必须明确，属性名称拼接前缀就是配置文件中的属性key
 * Created by wangshuaixin on 17/5/8.
 */

@Component
@ConfigurationProperties(prefix = "master.datasource")
@Data
public class DataConfig {

    private String url;
    private String driverClassName;
    private String username;
    private String password;

}
